﻿using System;
using System.Windows;
using System.Windows.Controls;
using BusinessObjects;

namespace LogInModule.Views.GameInicialization
{
    public partial class CharacterSelectionView : UserControl
    {
        public Action<CharacterTypes> CharacterSelected;

        public CharacterSelectionView()
        {
            InitializeComponent();
        }

        private void BoyButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.CharacterSelected != null)
            {
                this.CharacterSelected(CharacterTypes.Boy);
            }
        }

        private void GirlButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.CharacterSelected != null)
            {
                this.CharacterSelected(CharacterTypes.Girl);
            }
        }

        private void MoliButton_Click( object sender, RoutedEventArgs e )
        {
            if ( this.CharacterSelected != null )
            {
                this.CharacterSelected( CharacterTypes.Moli );
            }
        }

        private void KidoButton_Click( object sender, RoutedEventArgs e )
        {
            if ( this.CharacterSelected != null )
            {
                this.CharacterSelected( CharacterTypes.Kido );
            }
        }

        private void MoniButton_Click( object sender, RoutedEventArgs e )
        {
            if ( this.CharacterSelected != null )
            {
                this.CharacterSelected( CharacterTypes.Moni );
            }
        }

        private void SebastianButton_Click( object sender, RoutedEventArgs e )
        {
            if ( this.CharacterSelected != null )
            {
                this.CharacterSelected( CharacterTypes.Sebastian );
            }
        }
    }
}